package com.dly.hope.model.vo;

import com.dly.hope.modle.UserAccount;
import lombok.Data;

@Data
public class MemberVo {

    /**
     * 用户id
     */
    private String id;

    /**
     * 用户name
     */
    private String name;

    /**
     * 用户账号
     */
    private String account;

    /**
     * 用户邮箱
     */
    private String email;

    /**
     * 头像
     */
    private String avatar;

    public static MemberVo toVo(UserAccount userAccount){
        MemberVo memberVo = new MemberVo();
        memberVo.setName(userAccount.getAccountName());
        memberVo.setId(userAccount.getId());
        memberVo.setAvatar(userAccount.getAvatar());
        memberVo.setEmail(userAccount.getEmail());
        memberVo.setAvatar(userAccount.getAvatar());
        return memberVo;
    }
}
